Xbasic
SQL::RowData Method
Syntax
Data as A = .Data(ColumnIndex as N | ColumnName as C)
Arguments
- Data
The returned column data.
- SQL::Row
A SQL::Row object created with a DIM statement.
- ColumnIndex
The index of the column containing the data.
- ColumnName
The name of the column containing the data.
Description
Get the value of the data column specified.
Discussion
The Data() method returns the data in the specified column.
Example
dim conn as SQL::Connection dim rs as SQL::ResultSet dim row as SQL::Row dim connString as C dim select_exp as C connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}" select_exp = "select * from customer where bill_state_region = 'ny'" if .not. conn.open(connString) ui_msg_box("Error", conn.CallResult.text) end end if if .not. conn.execute(select_exp) ui_msg_box("Error", conn.CallResult.text) conn.close() end end if rs = conn.ResultSet rs.NextRow() row = rs.CurrentRow ui_msg_box("Column Data By Name", "" + row.Data("lastname")) ui_msg_box("Column Data By Number", "" + row.Data(2)) conn.close()
See Also